<template>
  <div class="card">
    <h2>作用域插槽</h2>
    <div>
      <slot :list="gameList">默认内容</slot>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'

let gameList = ref([
  { id: 0, name: '原神' },
  { id: 1, name: '王者' }
])
</script>

<style lang="scss" scoped>
.card {
  background-color: rgb(98, 199, 249);
  border-radius: 10px;
  padding: 10px;
  width: 200px;
  height: 300px;

  .title {
    background-color: rgba(242, 123, 123, 0.333);
    text-align: center;
  }
}
</style>
